<template>
	<view>
		<u-sticky bgColor="#F3F5F7">
			<!-- <u-status-bar></u-status-bar> -->
			<view class="top">
				<u-tabs :list="list4" lineWidth="44rpx" lineHeight='14rpx' :lineColor="`url(${lineBg}) 100% 100%`"
					:activeStyle="{
				            color: '#000000',
				            fontWeight: 'bold',
				            transform: 'scale(1.125)'
				        }" :inactiveStyle="{
				            color: '#666666',
				            transform: 'scale(1)'
				        }" itemStyle="padding-left: 24rpx; padding-right: 24rpx; height: 92rpx;font-size:32rpx;width:327rpx;" @click="clicktab"
					:current='cur'>
				</u-tabs>
			</view>
		</u-sticky>
		<view class="con">
			<!-- 充值 -->
			<view class="con__box" v-if="cur==0">
				<view class="con__box__item" v-for="(item,index) in 15" :key="index">
					<view class="">
						<view class="con__box__item__name">
							微信充值
						</view>
						<view class="con__box__item__time">
							2024-04-01 13:48:43
						</view>
					</view>
					<view class="">
						<view class="u-flex u-flex-y-center">
							<text class="con__box__item__val1">6600</text><text class="con__box__item__val3">金币</text>
							<text class="con__box__item__val2" style="margin: 0 8rpx;">+</text>
							<text class="con__box__item__val2">6600</text><text class="con__box__item__val4">红包</text>
						</view>
						<view class="con__box__item__price">
							¥66
						</view>
					</view>
				</view>
			</view>
			<!-- 消费 -->
			<view class="con__box" v-if="cur==1">
				<view class="con__box__item" v-for="(item,index) in 15" :key="index">
					<view class="">
						<view class="con__box__item__name">
							购买章节
						</view>
						<view class="con__box__item__time">
							2024-04-01 13:48:43
						</view>
					</view>
					<view class="">
						<view class="u-flex u-flex-y-center">
							<text class="con__box__item__val1" style="color: #EEA636;">-6600</text><text class="con__box__item__val3" style="color: #EEA636;">金币</text>
						</view>
						<view class="con__box__item__price" style="margin-top: 8rpx;">
							<text class="con__box__item__val2" style="color: #51CAEF;">6600</text><text class="con__box__item__val4" style="color: #51CAEF;">红包</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list4: [{
					name: '充值记录'
				}, {
					name: '消费记录',
				}, ],
				cur:0,
				lineBg: this.$store.state.lineBg,
			};
		},
		methods:{
			clicktab(e){
				this.cur=e.index
			}
		}
	}
</script>

<style lang="scss">
.con{
	padding: 24rpx;
	&__box{
		background: #FFFFFF;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		padding: 0 24rpx;
		:last-child{
			border-bottom: 0;
		}
		&__item{
			display: flex;
			align-items: center;
			justify-content: space-between;
			height: 130rpx;
			border-bottom: 1rpx solid #EEEEEE;
			&__name{
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 28rpx;
				color: #000000;
				line-height: 40rpx;
				margin-bottom: 8rpx;
			}
			&__time{
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #999999;
				line-height: 34rpx;
			}
			&__val1{
				font-family: DIN, DIN;
				font-weight: bold;
				font-size: 28rpx;
				color: #000000;
				line-height: 28rpx;
			}
			&__val2{
				font-family: DIN, DIN;
				font-weight: bold;
				font-size: 28rpx;
				color: #51CAEF;
				line-height: 28rpx;
			}
			&__val3{
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #000000;
				line-height: 28rpx;
			}
			&__val4{
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #51CAEF;
				line-height: 28rpx;
			}
			&__price{
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #999999;
				line-height: 34rpx;
				text-align: right;
			}
		}
	}
}
</style>
